<?php



// 1 临时用户和正式用户 2 正式用户 3 无需auth验证
// 活动模块
$router->get('activity/index', ['middleware' => 'auth', 'uses' => 'ActivityController@index']);
$router->get('activity/list', ['middleware' => 'auth', 'uses' => 'ActivityController@list']);
$router->get('activity/share', ['middleware' => 'auth', 'uses' => 'ActivityController@share']);
$router->get('activity/detail', ['middleware' => 'auth', 'uses' => 'ActivityController@detail']);
$router->get('activity/rob_token', ['middleware' => 'auth:2', 'uses' => 'ActivityController@getRobToken']);
$router->get('activity/rob', ['middleware' => 'auth:2', 'uses' => 'ActivityController@rob']);
$router->post('activity/order_confirm', ['middleware' => ['auth:2', 'xss'], 'uses' => 'ActivityController@orderConfirm']);

// 积分商城模块
$router->get('/point/index', ['middleware' => 'auth', 'uses' => 'PointGoodsController@index']);
$router->get('/point/detail', ['middleware' => 'auth', 'uses' => 'PointGoodsController@detail']);
$router->post('/point/order', ['middleware' => 'auth:2', 'uses' => 'PointGoodsController@order']);
$router->get('/point/log', ['middleware' => 'auth:2', 'uses' => 'PointGoodsController@log']);
$router->post('/point/cash', ['middleware' => 'auth:2', 'uses' => 'PointGoodsController@cash']);
$router->get('/point/cash_list', ['middleware' => 'auth:2', 'uses' => 'PointGoodsController@cashList']);

// 用户模块
$router->post('user/login', ['middleware' => ['auth:3', 'xss'], 'uses' => 'UserController@login']);
$router->post('user/logout', ['middleware' => ['auth:3', 'xss'], 'uses' => 'UserController@logout']);
$router->post('user/avatar', ['middleware' => ['auth:2', 'xss'], 'uses' => 'UserController@avatar']);
$router->post('user/share', ['middleware' => ['auth:2', 'xss'], 'uses' => 'UserController@share']);

// App模块
$router->get('/app/config', ['middleware' => ['auth:3', 'xss'], 'uses' => 'AppController@config']);
$router->get('/app/captcha', ['middleware' => 'auth', 'uses' => 'AppController@captcha']);
$router->post('/app/sms', ['middleware' => 'auth', 'uses' => 'AppController@sms']);
$router->post('/app/feedback', ['middleware' => 'auth', 'uses' => 'AppController@feedback']);
$router->get('/app/info', 'AppController@info');

// 订单模块
$router->get('order/list', ['middleware' => 'auth:2', 'uses' => 'OrderController@list']);
$router->post('order/confirm', ['middleware' => 'auth:2', 'uses' => 'OrderController@confirm']);
$router->get('order/logistic', ['middleware' => 'auth:2', 'uses' => 'OrderController@logistic']);

// 评论模块
$router->post('comment/order_add', ['middleware' => ['auth:2', 'xss'], 'uses' => 'CommentController@orderAdd']);
$router->post('comment/activity_add', ['middleware' => ['auth:2', 'xss'], 'uses' => 'CommentController@activityAdd']);
$router->get('comment/my', ['middleware' => ['auth:2', 'xss'], 'uses' => 'CommentController@my']);
$router->get('comment/activity', ['middleware' => 'auth', 'uses' => 'CommentController@activity']);

// 文章模块
$router->get('/article/detail', 'ArticleController@getDetail');
